<html>
<head><meta charset="utf-8"><title>Syntax Highlighting partially broken? · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax.20Highlighting.20partially.20broken.3F.html">Syntax Highlighting partially broken?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="197015455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax%20Highlighting%20partially%20broken%3F/near/197015455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax.20Highlighting.20partially.20broken.3F.html#197015455">(May 09 2020 at 21:48)</a>:</h4>
<p>I just started vscode to be greeted by struct names suddenly having the same color as keywords, at least when using the One Dark Pro theme as well as fields having the same color as functions now. Is this already a known problem that recently popped up? <a href="/user_uploads/4715/ysJ_MNwa7H-iM_rJFyOn2PM6/Code_uDWfPvtyqL.png" title="Code_uDWfPvtyqL.png">Code_uDWfPvtyqL.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/ysJ_MNwa7H-iM_rJFyOn2PM6/Code_uDWfPvtyqL.png" title="Code_uDWfPvtyqL.png"><img src="/user_uploads/4715/ysJ_MNwa7H-iM_rJFyOn2PM6/Code_uDWfPvtyqL.png"></a></div>



<a name="197015687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax%20Highlighting%20partially%20broken%3F/near/197015687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax.20Highlighting.20partially.20broken.3F.html#197015687">(May 09 2020 at 21:55)</a>:</h4>
<p>In other themes, structs and keywords dont have the same color, but structs and type aliases do not share the same color either + not using RA gives a different color spread(with the default rust syntax highlighting) than when using it.</p>



<a name="197016472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax%20Highlighting%20partially%20broken%3F/near/197016472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax.20Highlighting.20partially.20broken.3F.html#197016472">(May 09 2020 at 22:14)</a>:</h4>
<p>Okay updating to RA nightly seems to have fixed the problem mostly, tho fields are still colored like functions which i believe was not always the case?</p>



<a name="197022480"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax%20Highlighting%20partially%20broken%3F/near/197022480" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> George Fraser <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax.20Highlighting.20partially.20broken.3F.html#197022480">(May 10 2020 at 00:20)</a>:</h4>
<p>Textmate scopes can be really weird and surprising. The fact that struct names were colored like keywords was a VSCode bug, which they just fixed, that's why nightly is better for that one: <a href="https://github.com/microsoft/vscode/issues/97162" title="https://github.com/microsoft/vscode/issues/97162">https://github.com/microsoft/vscode/issues/97162</a></p>
<p>There are a bunch of other small issues with the textmate scopes used by semantic coloring, including the one you mentioned about fields getting colored like functions. I've proposed a PR in rust-analyzer to fix those: <a href="https://github.com/rust-analyzer/rust-analyzer/pull/4397" title="https://github.com/rust-analyzer/rust-analyzer/pull/4397">https://github.com/rust-analyzer/rust-analyzer/pull/4397</a></p>



<a name="197042965"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Syntax%20Highlighting%20partially%20broken%3F/near/197042965" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Syntax.20Highlighting.20partially.20broken.3F.html#197042965">(May 10 2020 at 08:54)</a>:</h4>
<p>Ah I see, I already suspected Semantic coloring, thanks for clarifying</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>